<template>
	<view v-model="formParams">
		<carHeader :title="'商户资料'"></carHeader>
		<view class="only">
			<view class="one">
				<p>
					<span>负责人：</span>
					<span>{{formParams.name}}</span>
				</p>
				<p>
					<span>身份证号码：</span>
					<span>{{formParams.idNum}}</span>
				</p>
				<p>
					<span>手机号：</span>
					<span>{{formParams.phone}}</span>
				</p>
				<p>
					<span>店名：</span>
					<span>{{formParams.shopName}}</span>
				</p>
				<p>
					<span>工商营业执照号码：</span>
					<span>{{formParams.shopId}}</span>
				</p>
				<p>
					<span>经营区域：</span>
					<span>{{formParams.shopAddress}}</span>
				</p>
				<p>
					<span>经营地址：</span>
					<span>{{formParams.shopHome}}</span>
				</p>
			</view>
			<view class="two">
				<view class="shop1">
					商家简介
				</view>
				<view class="shop2">
					{{formParams.message}}
				</view>
			</view>
			<view class="three">
				<view class="three1">
					身份证正反照片
				</view>
				<view class="three2">
					<image :src="formParams.formFileList1[0]" mode="aspectFit"></image>
					<image :src="formParams.formFileList1[1]" mode="aspectFit"></image>
				</view>
			</view>
			<view class="four">
				<view class="four1">
					营业执照
				</view>
				<view class="four2">
					<image :src="formParams.formFileList2[0]" mode="aspectFit"></image>
				</view>
			</view>
			<view class="four">
				<view class="four1">
					门店照片
				</view>
				<view class="four2">
					<image :src="formParams.formFileList3[0]" mode="aspectFit"></image>
				</view>
			</view>
		<navigator url="/pages/registerShop/registerShop"
		>
		<view class="five" @click="confirmData()">修改</view>
		</navigator>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formParams:{
					//姓名
					name: null,
					//身份证号
					idNum: null,
					//电话
					phone: null,
					/* 验证码 */
					phoneNum: null,
					//店名
					shopName: null,
					//工商营业执照号码
					shopId: null,
					//经营区域
					shopAddress: null,
					//经营地址
					shopHome: null,
					//商家简介
					message: null,
					//身份证正反照片
					formFileList1: [],
					//营业执照
					formFileList2: [],
					//门店照片
					formFileList3: [],
				},
			};
		},
		onLoad() {
			this.findUser();
		},
		methods:{
			findUser(){
				let that = this;
				uni.request({
					url:"http://localhost:8080/carShopService/find/findShopUser?id=1",
					method:"GET",
					success(res) {
						that.formParams = res.data.data;
					}
				});
			}
		}
	}
</script>

<style lang="scss">
.only{
	margin: 0 20rpx;
	position: relative;
	top: -240rpx;
	.one{
		font-weight: 550;
		font-size: 30rpx;
		background-color: #fff;
		border-radius: 50rpx;
		padding: 40rpx 30rpx;
		p {
			margin-top: 20rpx;
			display: flex;
			justify-content: space-between;
		}
	}
	.two {
		background-color: #fff;
		border-radius: 50rpx;
		padding: 40rpx 30rpx;
		margin-top: 20rpx;
		.shop1 {
			font-weight: 550;
			font-size: 30rpx;
		}
		.shop2 {
			margin-top: 20rpx;
			font-size: 24rpx;
			color: #b4b4b4;
		}
	}
	.three {
		background-color: #fff;
		border-radius: 50rpx;
		padding: 40rpx 30rpx;
		margin-top: 20rpx;
		.three1 {
			font-weight: 550;
			font-size: 30rpx;
		}
		.three2 {
			width: 500rpx;
			padding: 10rpx;
			margin-top: 20rpx;
			image {
				position: relative;
				width: 200rpx;
				height: 160rpx;
				margin-right: 40rpx;
			}
		}
	}
	.four {
		background-color: #fff;
		border-radius: 50rpx;
		padding: 40rpx 30rpx;
		margin-top: 20rpx;
		.four1 {
			font-weight: 550;
			font-size: 30rpx;
		}
		.four2 {
			margin-top: 20rpx;
			width: 500rpx;
			image {
				position: relative;
				width: 200rpx;
				height: 160rpx;
				margin-right: 40rpx;
			}
		}
		
	}
	.five{
		background-color: #4886f0;
		font-size: 36rpx;
		color: #fff;
		text-align: center;
		padding: 20rpx 0;
		margin: 40rpx;
		border-radius: 20rpx;
	}
}
</style>
